package org.ourgrid.broker.controlws.gatewayws;

import javax.jws.WebMethod;
import javax.jws.WebService;

import org.ourgrid.broker.controlws.WSJobSpec;

@WebService()
public class Broker3GControlWS {
	
	private Broker3GControlWSFacade facade;
	
	
	public Broker3GControlWS() {
		facade = Broker3GWSContextCreator.createWSFacade();
	}
	
	@WebMethod
	public long requestToTransfer(WSJobSpec job) {
		return facade.requestToTransfer(job);
	}
	
	@WebMethod
	public int submitJob( long waterMark ) {
		return facade.submitJob(waterMark);
	}

	@WebMethod
	public String getStatus( int jobId ) {
		return facade.getJobStatus(jobId);
	}

	@WebMethod
	public boolean cancelJob( long waterMark, int jobId ) {
		return facade.cancelJob(waterMark, jobId);
	}

	@WebMethod
	public boolean getFiles( long waterMark, int jobID ) {
		return facade.getFiles(waterMark, jobID);
	}

	@WebMethod
	public boolean cleanJob( long waterMark, int jobID ) {
		return facade.cleanJob(waterMark, jobID);
	}
	
}
